import request from '@/utils/request'

// 查询教练列表
export function listCoach(query) {
  return request({
    url: '/puyu/coach/list',
    method: 'get',
    params: query
  })
}

// 查询教练详细
export function getCoach(coachId) {
  return request({
    url: '/puyu/coach/' + coachId,
    method: 'get'
  })
}

// 新增教练
export function addCoach(data) {
  return request({
    url: '/puyu/coach',
    method: 'post',
    data: data
  })
}

// 修改教练
export function updateCoach(data) {
  return request({
    url: '/puyu/coach',
    method: 'put',
    data: data
  })
}

// 删除教练
export function delCoach(coachId) {
  return request({
    url: '/puyu/coach/' + coachId,
    method: 'delete'
  })
}

// 查询教练用户列表
export function listCoachUser() {
  return request({
    url: '/puyu/coach/coachUserList',
    method: 'get'
  })
}

// 查询教练列表
export function listCoachs() {
  return request({
    url: '/puyu/coach/coachList',
    method: 'get'
  })
}

// 查询教练列表(含已删除)
export function listAllCoachs() {
  return request({
    url: '/puyu/coach/coachAllList',
    method: 'get'
  })
}
